<template>
  <div class="qulabzka">
    <statistic-query-form ref="queryForm"
                          @doQuery="getList"
                          :data-uri="'/kh/statistic/scoreInfo/'"
                          :pattern="3"
                          :dept-type="1"
                          :export-uri="'/kh/statistic/scoreInfoExport/'"
    ></statistic-query-form>
    <p class="titleqy"><b>企业领导班子考核得分表</b> </p>
    <el-table
      v-loading="loading"
      :data="tableData"
      style="width: 95%;margin-left: 20px">
      <el-table-column
        prop="deptName"
        align="center"
        label="单位">
      </el-table-column>
      <el-table-column
        type="index"
        align="center"
        label="序号"
        width="55">
      </el-table-column>
      <el-table-column
        align="center"
        label="被测评干部的基本情况">
        <el-table-column
          prop="assessItemName"
          align="center"
          label="姓名">
        </el-table-column>
        <el-table-column
          prop="sex"
          align="center"
          label="性别">
        </el-table-column>
        <el-table-column
          prop="birthDate"
          align="center"
          label="出生年月">
        </el-table-column>
        <el-table-column
          prop="originalPosition"
          align="center"
          label="原任职务">
        </el-table-column>
        <el-table-column
          prop="presentPosition"
          align="center"
          label="现任职务">
        </el-table-column>
        <el-table-column
          prop="positionTime"
          align="center"
          label="任职时间">
        </el-table-column>
      </el-table-column>


      <el-table-column :label="item.title"  align="center" v-for="item in hangname">
        <el-table-column
          v-for="row in item.headItems"
          :prop="row.prop"
          align="center"
          :label="row.label">
        </el-table-column>
      </el-table-column>
      <el-table-column
        prop="satisfiedScore"
        align="center"
        label="满意度分值">
      </el-table-column>
      <el-table-column
        prop="disagreeScore"
        align="center"
        label="不认同率">
      </el-table-column>
    </el-table>
    <p style="font-size: 15px;margin-left: 20px">备注：不认同率=‘不满意’/（‘满意+基本满意+不满意’）</p>

  </div>
</template>

<script>
  import request from '@/utils/request'
  import StatisticQueryForm from '../components/StatisticQueryForm'
  export default {
    name: "Login",
    data() {
      return {
        junfen:0,
        loading:false,
        //表头
        hangname:[
          {tltlename:'40%',
            xxarr:[
              {xingming:'张三',prop:'name'},
              {xingming:'李四',prop:'name1'},
              {xingming:'小计',prop:'xiaoji'},
            ]
          },
        ],
        //总数居
        tableData: []

      };
    },

    components:{
      'StatisticQueryForm': StatisticQueryForm
    },

    created() {

    },
    methods: {
      //获取列表数据
      getList(obj) {
        this.loading =true
        request({
          url: obj.url,
          method: 'get',
        }).then(response => {
          this.loading =false
          this.hangname = response.data.heads
          this.tableData = response.data.body
        });
      }
    }
  };
</script>

<style  lang="scss">
  .qulabzka {
    margin-top: 20px;
  }
  .qulabzka .tablestyle {
    border: 1px solid #cccccc;
    color: #606266;
    font-size: 15px;
    width: 95%;
    margin-left: 20px;
    th{
      height: 36px;
    }

  }
  .qulabzka .tablestyle td {
    height: 34px;
    text-align: center;
  }
  .qulabzka .titleqy {
    margin-top: 20px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
  }
</style>
